﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using Vaffanculo.Presentation.Component.WizardControl.Utils;

namespace Vaffanculo.Presentation.Component.WizardControl.Wizards.WizardsMDX
{
    /// <summary>
    /// Interaction logic for DimentionForm.xaml
    /// </summary>
    public partial class DimentionForm : Window  
    {
        public DimentionLevelModel DimentionLevelModelForm { get; set; }
        private ActionWizardManager _actionWizardManager;
        private ActionWizardMdx actionWizardMdx;

        public DimentionForm(ActionWizardManager actionWizardManager)
        {
            _actionWizardManager = actionWizardManager;
            actionWizardMdx = new ActionWizardMdx();
            actionWizardManager.Attach(actionWizardMdx);
            InitializeComponent();
        }

        private void Window_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (e.LeftButton == System.Windows.Input.MouseButtonState.Pressed)
                this.DragMove();
        }

        private void BtnCloseClick(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void ButtonClick(object sender, RoutedEventArgs e)
        {
            DimentionLevelModelForm = new DimentionLevelModel
                                          {
                                              IsDimention = true,
                                              Name = txtNameDimention.Text,
                                              TypeAttibute = string.Empty
                                          };
            actionWizardMdx.Update();
        }
    }
}
